import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '日程标题',
    align: "center",
    dataIndex: 'title'
  },
  {
    title: '日程类型',
    align: "center",
    dataIndex: 'type_dictText'
  },
  {
    title: '提醒类型',
    align: "center",
    dataIndex: 'remindType_dictText'
  },
  {
    title: '紧急程度',
    align: "center",
    dataIndex: 'urgentLevel_dictText'
  },
  {
    title: '提醒时间',
    align: "center",
    dataIndex: 'reminderTime_dictText'
  },
  {
    title: '重复提醒',
    align: "center",
    dataIndex: 'remind_dictText'
  },
  {
    title: '日程开始时间',
    align: "center",
    dataIndex: 'startTime'
  },
  {
    title: '日程结束时间',
    align: "center",
    dataIndex: 'endTime'
  },
  {
    title: '是否全天',
    align: "center",
    dataIndex: 'allDay',
    customRender:({text}) => {
       return  render.renderSwitch(text, [{text:'是',value:'Y'},{text:'否',value:'N'}]);
     },
  },
  {
    title: '颜色',
    align: "center",
    dataIndex: 'planColor_dictText'
  },
  {
    title: '参与人',
    align: "center",
    dataIndex: 'receiverIds_dictText'
  },
  {
    title: '备注',
    align: "center",
    dataIndex: 'remark',
  },
];

// 高级查询数据
export const superQuerySchema = {
  title: {title: '日程标题',order: 0,view: 'text', type: 'string',},
  type: {title: '日程类型',order: 1,view: 'list', type: 'string',dictCode: 'scheduleType',},
  remindType: {title: '提醒类型',order: 2,view: 'list', type: 'string',dictCode: 'remindMode',},
  urgentLevel: {title: '紧急程度',order: 3,view: 'list', type: 'string',dictCode: 'urgent_level',},
  reminderTime: {title: '提醒时间',order: 4,view: 'list', type: 'string',dictCode: 'reminderTimeType',},
  remind: {title: '重复提醒',order: 5,view: 'list', type: 'string',dictCode: 'repeatReminderType',},
  startTime: {title: '日程开始时间',order: 6,view: 'datetime', type: 'string',},
  endTime: {title: '日程结束时间',order: 7,view: 'datetime', type: 'string',},
  allDay: {title: '是否全天',order: 8,view: 'switch', type: 'string',},
  planColor: {title: '颜色',order: 9,view: 'radio', type: 'string',},
  receiverIds: {title: '参与人',order: 10,view: 'sel_user', type: 'string',},
  remark: {title: '备注',order: 11,view: 'umeditor', type: 'string',},
};
